#pragma once
#include <string>
#include <vector>

using namespace std;

//Baseclass of the commands. Handles the recognition of user typed text
class Command
{
public:
	static void DisplayText(string text);
	static string GetTypedCommand();
	
	bool Parse(string typedCommand);	//Determine what to do when a player typed something
	virtual void DoAction() = 0;
	virtual string GetCommandWord() = 0;
};

//The CMD template holds the static data that belongs to a command (e.g.: look).
//This is used by the Command class to determine if a command should be run when
//a user typed a line.
template <class C>
class CMD : public Command
{
protected:
	static string CommandWord;		//What the player should type to run this command

public:
	virtual void DoAction() = 0;
	virtual string GetCommandWord() { return CommandWord; }
};
